//
//  UIViewController+collectionView.h
//  zxc
//
//  Created by delicious on 2018/1/13.
//  Copyright © 2018年 李李善. All rights reserved.
//

#import <UIKit/UIKit.h>
//#import <MJRefresh/MJRefresh.h>
#import "MCCollVCellInfo.h"
#import "UICollectionView+registerView.h"
#import "BaseCollectionViewCell.h"
#import "BaseCollectionReusableView.h"

@interface UIViewController (collectionView)

/**
 *  设置控件的方法或者获取
 *
 *  @param cell      所在的单元格
 *
 *  @param collectionView 所在的表格
 *  @param indexPath cell所在的indexPath
 */
-(void)onSetSubviewSELForCell:(UICollectionViewCell *)cell forCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath;
-(void)onSetSubviewSELForFooderView:(UICollectionReusableView *)fooderView forCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath;
-(void)onSetSubviewSELForHeaderView:(UICollectionReusableView *)headerView forCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath;


-(MCCollVCellInfo *)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)layout cellForIndexPath:(NSIndexPath *)indexPath sectionAtIndex:(NSInteger)section IsSection:(BOOL)isSection;

-(MCReusableViewInfo *)collectionView:(UICollectionView *)collectionView HeaderSectionAtIndex:(NSInteger)section AtIndexPath:(NSIndexPath *)indexPath IsSize:(BOOL)isSize;

-(MCReusableViewInfo *)collectionView:(UICollectionView *)collectionView FooderSectionAtIndex:(NSInteger)section AtIndexPath:(NSIndexPath *)indexPath IsSize:(BOOL)isSize;


/**
 *  cell初始化控件需要的数据
 *
 *  @param indexPath cell所在的indexPath
 *
 *  @return 需要的数据
 */
-(id _Nullable)cellInitForSourceAtIndexPath:(NSIndexPath *)indexPath;
/**
 *  根据indePath从数据数组获取model
 *
 *  @param indexPath 获取model所在数据数组的位置
 */
-(id _Nullable )modelForIndexPath:(NSIndexPath *)indexPath;

/**
 *  根据indePath从数据数组获取model
 *
 *  @param indePath 获取model所在数据数组的位置
 */
-(id _Nullable )reusableHeadterModelForIndexPath:(NSIndexPath *)indePath;
/**
 *  根据indePath从数据数组获取model
 *
 *  @param indePath 获取model所在数据数组的位置
 */
-(id _Nullable )reusableFoodterModelForIndexPath:(NSIndexPath *)indePath;
@end
